/**
 * Created with IntelliJ IDEA.
 * Description:求最大值方法的重载
 * User: zjc
 * Date: 2022-04-27
 * Time: 21:16
 */
public class Project {
    public static int Max(int a, int b) {
        if (a>b){
            return a;
        }else{
            return b;
        }
    }
    public static double Max(double a, double b) {
        if (a>b){
            return a;
        }else{
            return b;
        }
    }

    public static double Max(int a, int b, double c) {
        int sum;
        if(a>=b){
            sum = a;
        }else{
            sum = b;
        }
        if (sum>c){
            return sum;
        } else{
            return c;
        }

    }
    public static void main(String[] args){
        int a = 5; int b = 9;
        double c = 3.6; double d = 6.4;
        int e = 9; int f = 9; double g = 9.2;
        int x = Max(a, b);
        double y = Max(c, d);
        double z = Max(e, f, g);
        System.out.println(x);
        System.out.println(y);
        System.out.println(z);
    }
}
